home *** CD-ROM | disk | FTP | other *** search
- Path: news1.h1.usa.pipeline.com!usenet
- From: grantp@usa.pipeline.com
- Newsgroups: comp.lang.c++
- Subject: Re: How to ... declare a virtual static function in a class ?
- Date: 7 Jan 1996 14:23:02 GMT
- Organization: Pipeline USA
- Message-ID: <4col06$87l@news1.usa.pipeline.com>
- NNTP-Posting-Host: pipe4.h1.usa.pipeline.com
- X-PipeUser: grantp
- X-PipeHub: usa.pipeline.com
- X-PipeGCOS: (Pete)
- X-Newsreader: Pipeline USA v3.3.0
-
- On Jan 07, 1996 12:20:40 in article <How to ... declare a virtual static
- function in a class ?>, 'Jean-Pierre Schnyder <jschnyde@worldcom.ch>'
- wrote:
-
-
- >I guess this is not possible. Any idea on the rationale about this
- >limitation ?
-
- Correct. ARM 9.4 states that static member functions can not be
- virtual.
-
- A static member function is not associated with any particular
- instance of a class; therefore, it does not have a 'this' pointer,
- or more seriously, can be called with a null pointer. See
- "Design & Evolution of C++" by Stroustrup for more info.
-
-
- >--
- >--------------------------------------------------------------------------
-
- >Jean-Pierre Schnyder Software engineer
- >Switzerland
- >
- >.
- --
-
- Pete
-